/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package client;

import java.util.ArrayList;
import java.util.UUID;
import server.Test;
import server.TestSpec;

/**
 *
 * @author gravena
 */
public class TestSlave {
    private ArrayList<TestSpecSlave> specList; /* List of test specifications */
    private UUID id; /* Unique identifier for the test */       
    
    public TestSlave(UUID id) {
        this.specList = new ArrayList<>();
        this.id = id;
    }
    
    public static TestSlave searchUUID(ArrayList<TestSlave> list, UUID id) {
        
        for(int i=0;i<list.size();i++) {   
            if(list.get(i).getId().compareTo(id) == 0) {
                return list.get(i);
            }
        }
        
        return null;
    }
    
    public boolean addTestSpec(TestSpecSlave t) {
        return specList.add(t);
    }

    public UUID getId() {
        return id;
    }
    
    public ArrayList<TestSpecSlave> getSpecList() {
        return this.specList;
    }
}
